﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================

CREATE PROCEDURE [dbo].[InsertTargetAreaPolygon]
	-- Add the parameters for the stored procedure here
	@TargetAreaKey int,
	@Polygon nvarchar(500)
	AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	update [TargetArea] 
	Set [Polygon] = geography::STGeomFromText(@Polygon,4326)
	WHERE @TargetAreaKey=[Id] 
END
;
